﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace WindowsFormsApp1
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();

            //string[] op = new[] { "+", "-", "*", "/" };
            //ComboBox cmb = new ComboBox();
            //cmb.DataSource = op;
            //cmb.Location = new System.Drawing.Point(194, 128);
            //cmb.Name = "comboBox";
            //cmb.Size = new System.Drawing.Size(158, 25);
            //cmb.DropDownStyle = ComboBoxStyle.DropDownList;
            //this.Controls.Add(cmb);
            //this.button1.Click += new System.EventHandler(this.button1_Click);
        }

        private void button1_Click(object sender, EventArgs e)
        {
            double s1 = Convert.ToDouble(textBox1.Text);
            double s2 = Convert.ToDouble(textBox2.Text);
            string operation = comboBox1.Text;
            switch (operation)
            {
                case "+":textBox3.Text = Convert.ToString(s1 + s2); break;
                case "-": textBox3.Text = Convert.ToString(s1 - s2); break;
                case "*": textBox3.Text = Convert.ToString(s1 * s2); break;
                case "/": textBox3.Text = Convert.ToString(s1 / s2); break;
            }
            
        }

        private void textBox1_TextChanged(object sender, EventArgs e)
        {

        }

        private void Form1_Load(object sender, EventArgs e)
        {

        }
       

        private void label1_Click(object sender, EventArgs e)
        {

        }

        private void label2_Click(object sender, EventArgs e)
        {

        }

        private void label3_Click(object sender, EventArgs e)
        {

        }

        private void textBox2_TextChanged(object sender, EventArgs e)
        {

        }

        private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
        {

        }

        private void label3_Click_1(object sender, EventArgs e)
        {

        }
    }
}
